home *** CD-ROM | disk | FTP | other *** search
/ Champak 54 / Vol 54.iso / games / gardenin.swf / scripts / frame_63 / DoAction_2.as next >
Encoding:
Text File  |  2007-09-27  |  995 b   |  53 lines

  1. this.stop();
  2. SoundObj = new Sound(this);
  3. SoundObj.attachSound("bgm");
  4. SoundObj.start(0,9999);
  5. score = 0;
  6. time_num = 10;
  7. mc.startDrag(this);
  8. seed_num = 0;
  9. tool_num = 0;
  10. total_cost = 0;
  11. success_seed = 0;
  12. good_seed = 0;
  13. var i = 1;
  14. while(i <= 6)
  15. {
  16.    this["good_seed" + i] = false;
  17.    this["price_seed" + i] = 0;
  18.    this["get_seed" + i] = 30;
  19.    this["cost_seed" + i] = 0;
  20.    this["give_seed" + i] = 2;
  21.    i++;
  22. }
  23. this.cost_bugs = 2;
  24. this.cost_tonic = 2;
  25. time_i = 0;
  26. FNend = function()
  27. {
  28.    delete this.onEnterFrame;
  29.    var _loc2_ = 1;
  30.    while(_loc2_ <= 10)
  31.    {
  32.       if(this["earth" + _loc2_]._currentframe >= 33)
  33.       {
  34.          this["earth" + _loc2_].stop();
  35.       }
  36.       _loc2_ = _loc2_ + 1;
  37.    }
  38.    this.time_mc.gotoAndPlay(2);
  39. };
  40. this.onEnterFrame = function()
  41. {
  42.    trace(total_cost);
  43.    time_i++;
  44.    if(time_i % (24 * time_num) == 0)
  45.    {
  46.       this.menu_mc.calendar_mc.play();
  47.    }
  48.    if(success_seed == 10)
  49.    {
  50.       FNend();
  51.    }
  52. };
  53.